Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Jan 15, 2026

Fixes #10244
Also covers some (but no all of) use case for symlinking binary to /bin/false.

@oech3 oech3 marked this pull request as draft January 15, 2026 08:31
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?

@oech3 oech3 force-pushed the core-1 branch 3 times, most recently from e9b9baa to ddd1f27 Compare January 15, 2026 08:55
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 4.16%

Comparing oech3:core-1 (c54d944) with main (d7ed3c6)1

Summary

⚡ 2 improved benchmarks
❌ 1 regressed benchmark
✅ 279 untouched benchmarks
⏩ 38 skipped benchmarks2

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory cp_large_file[16] 115.3 KB 120.3 KB -4.16%
Memory sort_numeric[500000] 48.7 MB 47.3 MB +3.07%
Memory sort_key_field[500000] 32.8 MB 31.4 MB +4.65%

Footnotes

  1. No successful run was found on main (356567e) during the generation of this report, so d7ed3c6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?

@oech3 oech3 marked this pull request as ready for review January 15, 2026 10:43
Some(OsString::from(util))
} else {
// unmatched binary name => regard as multi-binary container and advance argument list
} else if binary_as_util.ends_with("coreutils") || binary_as_util.ends_with("box") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like to have .ends_with("box") in the binary just for test suite. Should be covered by shebang wrapper (at different PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shebang does not work...

@oech3 oech3 force-pushed the core-1 branch 2 times, most recently from 572a08f to a7da462 Compare January 15, 2026 16:07
@oech3 oech3 changed the title coreutils: Fail with invalid binary name tests/misc/coreutils.sh: Fail with invalid binary name Jan 15, 2026
@oech3 oech3 force-pushed the core-1 branch 7 times, most recently from 657c5e7 to f7625bd Compare January 16, 2026 10:54
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/misc/coreutils. tests/misc/coreutils is passing on 'main'. Maybe you have to rebase?

@oech3

This comment was marked as resolved.

@sylvestre
Copy link
Contributor

GNU test failed: tests/misc/coreutils. tests/misc/coreutils is passing on 'main'. Maybe you have to rebase?

this should be fixed before

oech3 referenced this pull request in coreutils/coreutils Jan 18, 2026
Setup
  $ ln -nsf src/coreutils foo

Before
  $ ./foo; echo $?
  foo: unknown program ‘foo’
  Try './foo --help' for more information.
  1
  ./foo --version; echo $?
  coreutils (GNU coreutils) 9.9.172-01993
  0

After
  $ ./foo; echo $?
  coreutils: unknown program 'foo'
  1
  $ ./foo --version; echo $?
  coreutils: unknown program 'foo'
  1

* src/coreutils.c (main): Don't process options if
we don't know they're intended for the multi-call binary.
Otherwise `foo --version` would return true, even though
foo was symlinked to the multi-call binary, but not supported.
* tests/misc/coreutils.sh: Add test cases.
* NEWS: Mention the change in behavior.
@oech3

This comment was marked as resolved.

@oech3 oech3 marked this pull request as draft January 18, 2026 11:57
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?

@oech3
Copy link
Contributor Author

oech3 commented Jan 18, 2026

@oech3 oech3 marked this pull request as ready for review January 18, 2026 14:16
@sylvestre
Copy link
Contributor

are you sure?

2026-01-18T13:51:53.7896007Z FAIL: tests/env/env
2026-01-18T13:51:53.7896197Z ===================
2026-01-18T13:51:53.7896307Z 
2026-01-18T13:51:53.7896395Z simple_echo ./simple_echo
2026-01-18T13:51:53.7896633Z error: unexpected argument '---' found
2026-01-18T13:51:53.7896815Z 
2026-01-18T13:51:53.7896918Z   tip: to pass '---' as a value, use '-- ---'
2026-01-18T13:51:53.7897104Z 
2026-01-18T13:51:53.7897250Z Usage: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
2026-01-18T13:51:53.7897483Z 
2026-01-18T13:51:53.7897575Z For more information, try '--help'.
2026-01-18T13:51:53.7897856Z env: use -[v]S to pass options in shebang lines
2026-01-18T13:51:53.7898225Z error: a value is required for '--unset <NAME>' but none was supplied
2026-01-18T13:51:53.7898490Z 
2026-01-18T13:51:53.7898587Z For more information, try '--help'.
2026-01-18T13:51:53.7898853Z env: use -[v]S to pass options in shebang lines
2026-01-18T13:51:53.7899146Z nice: .: Permission denied (os error 13)
2026-01-18T13:51:53.7899417Z env: '.': Permission denied
2026-01-18T13:51:53.7899652Z env: 'no_such': No such file or directory
2026-01-18T13:51:53.7899940Z env: use -[v]S to pass options in shebang lines
2026-01-18T13:51:53.7900242Z env: 'also_unlikely': No such file or directory
2026-01-18T13:51:53.7900819Z env: use -[v]S to pass options in shebang lines
2026-01-18T13:51:53.7901184Z env: '--': No such file or directory
2026-01-18T13:51:53.7901455Z env: use -[v]S to pass options in shebang lines
2026-01-18T13:51:53.7901736Z env: cannot unset 'a=b': Invalid argument
2026-01-18T13:51:53.7902010Z env: cannot unset '': Invalid argument
2026-01-18T13:51:53.7902437Z env: cannot change directory to 'empty/nonexistent': No such file or directory (os error 2)
2026-01-18T13:51:53.7902878Z FAIL tests/env/env.sh (exit status: 1)

@oech3 oech3 marked this pull request as draft January 18, 2026 15:46
@oech3

This comment was marked as resolved.

oech3 referenced this pull request in coreutils/coreutils Jan 18, 2026
* tests/misc/coreutils.sh: Be more flexibile by using `command -v`
to identify the binary to be executed, rather than linking
directly to the built binary.
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/env/env. tests/env/env is passing on 'main'. Maybe you have to rebase?

@oech3

This comment was marked as resolved.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/ptx/ptx-overrun is no longer failing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coreutils: Unknown program should fail (tests/misc/coreutils.sh)

2 participants